package GUILag;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.JTextArea;
import javax.swing.JButton;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import java.awt.Color;

public class LeveringGUI extends JFrame {

	private JPanel contentPane;
	private JTextField txtDatoForAfhentning;
	private JTextField txtDatoForLevering;
	private JTextField txtKlokkesletForAfhentning;
	private JTextField txtKlokkesletForLevering;
	private JTextField txtLeveringsaddresseForOrdren;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					LeveringGUI frame = new LeveringGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public LeveringGUI() {
		setTitle("Levering/selvafhentning");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 659, 421);
		contentPane = new JPanel();
		contentPane.setBackground(Color.LIGHT_GRAY);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JTree tree = new JTree();
		tree.setModel(new DefaultTreeModel(
			new DefaultMutableTreeNode("Vestbjerg byggecenter A/S") {
				{
					add(new DefaultMutableTreeNode("Kassesalg"));
					add(new DefaultMutableTreeNode("Ordre"));
					add(new DefaultMutableTreeNode("Opret nyt medlem"));
					add(new DefaultMutableTreeNode("S\u00F8g efter medlem"));
				}
			}
		));
		tree.setBounds(0, 0, 153, 383);
		contentPane.add(tree);
		
		JTextArea textArea = new JTextArea();
		textArea.setText("Ordre ID: ");
		textArea.setBounds(398, 21, 136, 22);
		contentPane.add(textArea);
		
		JTextArea textArea_1 = new JTextArea();
		textArea_1.setText("Dato: ");
		textArea_1.setBounds(544, 21, 89, 22);
		contentPane.add(textArea_1);
		
		JButton btnKundennskerSelv = new JButton("Kunden \u00F8nsker ordren leveret");
		btnKundennskerSelv.setBounds(408, 101, 225, 77);
		contentPane.add(btnKundennskerSelv);
		
		JButton button = new JButton("Kunden \u00F8nsker selv at afhente ordren");
		button.setBounds(163, 101, 225, 77);
		contentPane.add(button);
		
		JButton button_1 = new JButton("Tilbage");
		button_1.setBounds(163, 349, 89, 23);
		contentPane.add(button_1);
		
		JButton button_2 = new JButton("N\u00E6ste");
		button_2.setBounds(544, 349, 89, 23);
		contentPane.add(button_2);
		
		txtDatoForAfhentning = new JTextField();
		txtDatoForAfhentning.setHorizontalAlignment(SwingConstants.CENTER);
		txtDatoForAfhentning.setText("Dato for afhentning af ordren");
		txtDatoForAfhentning.setBounds(163, 189, 225, 22);
		contentPane.add(txtDatoForAfhentning);
		txtDatoForAfhentning.setColumns(10);
		
		txtDatoForLevering = new JTextField();
		txtDatoForLevering.setText("Dato for levering af ordren");
		txtDatoForLevering.setHorizontalAlignment(SwingConstants.CENTER);
		txtDatoForLevering.setColumns(10);
		txtDatoForLevering.setBounds(408, 189, 225, 22);
		contentPane.add(txtDatoForLevering);
		
		txtKlokkesletForAfhentning = new JTextField();
		txtKlokkesletForAfhentning.setText("Klokkeslet for afhentning af ordren");
		txtKlokkesletForAfhentning.setHorizontalAlignment(SwingConstants.CENTER);
		txtKlokkesletForAfhentning.setColumns(10);
		txtKlokkesletForAfhentning.setBounds(163, 222, 225, 22);
		contentPane.add(txtKlokkesletForAfhentning);
		
		txtKlokkesletForLevering = new JTextField();
		txtKlokkesletForLevering.setText("Klokkeslet for levering af ordren");
		txtKlokkesletForLevering.setHorizontalAlignment(SwingConstants.CENTER);
		txtKlokkesletForLevering.setColumns(10);
		txtKlokkesletForLevering.setBounds(408, 222, 225, 22);
		contentPane.add(txtKlokkesletForLevering);
		
		txtLeveringsaddresseForOrdren = new JTextField();
		txtLeveringsaddresseForOrdren.setText("Leveringsaddresse for ordren");
		txtLeveringsaddresseForOrdren.setHorizontalAlignment(SwingConstants.CENTER);
		txtLeveringsaddresseForOrdren.setColumns(10);
		txtLeveringsaddresseForOrdren.setBounds(408, 255, 225, 22);
		contentPane.add(txtLeveringsaddresseForOrdren);
	}
}
